package com.qfedu.dao;

import com.qfedu.entity.Address;
import com.qfedu.entity.Cart;
import com.qfedu.entity.Item;
import com.qfedu.entity.Orders;

import javax.persistence.criteria.Order;
import java.lang.reflect.InvocationTargetException;
import java.math.BigDecimal;
import java.sql.SQLException;
import java.util.Date;
import java.util.List;

public interface OrderDao {
    List<Cart> selectCart(int uid) throws SQLException, InvocationTargetException, IllegalAccessException;
    List<Address> selectAddress(int uid) throws SQLException;
    List<Orders> getOrderListByUid(int uid) throws SQLException, InvocationTargetException, IllegalAccessException;
    int addOrder(String oid, int uid, int aid, BigDecimal ocount,String otime,int ostate) throws SQLException;
    int addItem(String oid,int pid,BigDecimal icount,int inum) throws SQLException;
    Orders queryOrderAddress(String oid) throws SQLException, InvocationTargetException, IllegalAccessException;
    List<Item> queryItemInfo(String oid) throws SQLException, InvocationTargetException, IllegalAccessException;
    List<Cart> getCartListByUid(int uid) throws SQLException, InvocationTargetException, IllegalAccessException;
    int deleteCart(int uid) throws SQLException;
    int updateState(int ostate, String oid) throws SQLException;
}
